/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.flexengine.config;

import com.flexengine.server.FlexEngineServer;
import com.flexengine.logger.Logger;
import com.flexengine.language.Language;
import com.flexengine.language.LanguageManager;
import com.flexengine.view.RendererType;
import java.awt.DisplayMode;
import java.awt.GraphicsDevice;
import java.awt.GraphicsEnvironment;
import java.io.File;
import javax.swing.JComboBox;
import javax.swing.JFileChooser;
import javax.swing.JOptionPane;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;

/**
 * @author Luann R. Athayde
 * @version 1.0
 * @since 1.0
 */
public class ConfigurationWindow extends javax.swing.JFrame {

    private Configuration configuration;
    
    /**
     * Creates new form ConfigurationWindow
     */
    private ConfigurationWindow() {
        super("FlexEngine Setup");
        LanguageManager.loadLanguages();
        try {
            UIManager.setLookAndFeel("javax.swing.plaf.nimbus.NimbusLookAndFeel");
        } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException e) {}
        configuration = ConfigurationManager.getInstace().loadConfiguration();
        if( configuration==null ) {
            configuration = new Configuration();
            ConfigurationManager.getInstace().setDefaultConfiguration(configuration);
            ConfigurationManager.getInstace().saveConfiguration();
        } else {
            ConfigurationManager.getInstace().setDefaultConfiguration(configuration);
        }
        Logger.logMessage("Configuration loaded! \n\tconfiguration = "+configuration);
        initComponents();
        
        // -- Setting video...
        comboBoxResolution.setSelectedItem(configuration.getResolution());
        comboBoxRender.setSelectedItem(configuration.getRenderer());
        // -- Setting generals...
        if( LanguageManager.containsLanguage(configuration.getLanguage()) ) {
            comboBoxLanguage.setSelectedItem(LanguageManager.getLanguage(configuration.getLanguage()));
        }
        this.setLocationRelativeTo(null);
    }
    
    private FlexDisplayMode[] getDisplayModes() {
        GraphicsDevice gDev = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice();
        DisplayMode dModes[] = gDev.getDisplayModes();
        FlexDisplayMode[] dms = new FlexDisplayMode[dModes.length];
        for(int i=0, j=dms.length-1;i<dms.length;i++,j--) {
            dms[i] = new FlexDisplayMode(
                    dModes[j].getWidth(), dModes[j].getHeight(), 
                    dModes[j].getBitDepth(), dModes[j].getRefreshRate());
        }
        return dms;
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        antialisingButtonGroup = new javax.swing.ButtonGroup();
        textAntialisingButtonGroup = new javax.swing.ButtonGroup();
        labelConfigTitle = new javax.swing.JLabel();
        separator1 = new javax.swing.JSeparator();
        labelVideoTitle = new javax.swing.JLabel();
        labelResolution = new javax.swing.JLabel();
        labelRender = new javax.swing.JLabel();
        separator2 = new javax.swing.JSeparator();
        labelGeneralTitle = new javax.swing.JLabel();
        labelLanguage = new javax.swing.JLabel();
        labelResourcesPath = new javax.swing.JLabel();
        separator3 = new javax.swing.JSeparator();
        labelSoundTitle = new javax.swing.JLabel();
        labelSoundEnable = new javax.swing.JLabel();
        labelGeneralVolume = new javax.swing.JLabel();
        labelMusicVolume = new javax.swing.JLabel();
        labelEffectVolume = new javax.swing.JLabel();
        labelSoundChannels = new javax.swing.JLabel();
        separator4 = new javax.swing.JSeparator();
        labelNetworkTitle = new javax.swing.JLabel();
        labelHost = new javax.swing.JLabel();
        labelPort = new javax.swing.JLabel();
        labelMaxConenctions = new javax.swing.JLabel();
        comboBoxResolution = new JComboBox(getDisplayModes());
        comboBoxRender = new JComboBox(RendererType.values());
        comboBoxLanguage = new JComboBox(LanguageManager.getAllAvailableLanguages());
        textFieldResourcePath = new javax.swing.JTextField();
        buttonResourcePathFind = new javax.swing.JButton();
        sliderGeneralVolume = new javax.swing.JSlider();
        sliderMusicVolume = new javax.swing.JSlider();
        sliderEffectVolume = new javax.swing.JSlider();
        sliderAudioChannels = new javax.swing.JSlider();
        labelGeneralVolumeAmount = new javax.swing.JLabel();
        labelMusicVolumeAmount = new javax.swing.JLabel();
        labelEffectVolumeAmount = new javax.swing.JLabel();
        labelAudioChannelsAmount = new javax.swing.JLabel();
        textFieldHost = new javax.swing.JTextField();
        textFieldPort = new javax.swing.JTextField();
        sliderMaxConnections = new javax.swing.JSlider();
        labelMaxConnecitonsAmount = new javax.swing.JLabel();
        jSeparator1 = new javax.swing.JSeparator();
        buttonSave = new javax.swing.JButton();
        buttonCancel = new javax.swing.JButton();
        labelFullScreen = new javax.swing.JLabel();
        checkBoxFullScreen = new javax.swing.JCheckBox();
        checkBoxSound = new javax.swing.JCheckBox();
        labelAntialising = new javax.swing.JLabel();
        labelTextAntialising = new javax.swing.JLabel();
        radioButtonAntialingOn = new javax.swing.JRadioButton();
        radioButtonAntialingOff = new javax.swing.JRadioButton();
        radioButtonTextAntialisingOn = new javax.swing.JRadioButton();
        radioButtonTextAntialisingOff = new javax.swing.JRadioButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setName("configurationWindow"); // NOI18N

        labelConfigTitle.setFont(new java.awt.Font("Verdana", 1, 18)); // NOI18N
        labelConfigTitle.setText("Configurações");

        labelVideoTitle.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N
        labelVideoTitle.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        labelVideoTitle.setText("Vídeo");

        labelResolution.setFont(new java.awt.Font("Serif", 0, 12)); // NOI18N
        labelResolution.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        labelResolution.setText("Resolução:");

        labelRender.setFont(new java.awt.Font("Serif", 0, 12)); // NOI18N
        labelRender.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        labelRender.setText("Render:");

        labelGeneralTitle.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N
        labelGeneralTitle.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        labelGeneralTitle.setText("Gerais");

        labelLanguage.setFont(new java.awt.Font("Serif", 0, 12)); // NOI18N
        labelLanguage.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        labelLanguage.setText("Idioma:");

        labelResourcesPath.setFont(new java.awt.Font("Serif", 0, 12)); // NOI18N
        labelResourcesPath.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        labelResourcesPath.setText("Diretório dos recursos:");

        labelSoundTitle.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N
        labelSoundTitle.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        labelSoundTitle.setText("Som");

        labelSoundEnable.setFont(new java.awt.Font("Serif", 0, 12)); // NOI18N
        labelSoundEnable.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        labelSoundEnable.setText("Utilizar som:");

        labelGeneralVolume.setFont(new java.awt.Font("Serif", 0, 12)); // NOI18N
        labelGeneralVolume.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        labelGeneralVolume.setText("Volume geral:");

        labelMusicVolume.setFont(new java.awt.Font("Serif", 0, 12)); // NOI18N
        labelMusicVolume.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        labelMusicVolume.setText("Volume da música:");

        labelEffectVolume.setFont(new java.awt.Font("Serif", 0, 12)); // NOI18N
        labelEffectVolume.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        labelEffectVolume.setText("Volume dos efeitos:");

        labelSoundChannels.setFont(new java.awt.Font("Serif", 0, 12)); // NOI18N
        labelSoundChannels.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        labelSoundChannels.setText("Canais de audio:");

        labelNetworkTitle.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N
        labelNetworkTitle.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        labelNetworkTitle.setText("Rede");

        labelHost.setFont(new java.awt.Font("Serif", 0, 12)); // NOI18N
        labelHost.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        labelHost.setText("Servidor de destino:");

        labelPort.setFont(new java.awt.Font("Serif", 0, 12)); // NOI18N
        labelPort.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        labelPort.setText("Porta:");

        labelMaxConenctions.setFont(new java.awt.Font("Serif", 0, 12)); // NOI18N
        labelMaxConenctions.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        labelMaxConenctions.setText("Máximo de Conexões:");

        comboBoxResolution.setEditable(true);
        comboBoxResolution.setFont(new java.awt.Font("Serif", 0, 12)); // NOI18N

        comboBoxRender.setFont(new java.awt.Font("Serif", 0, 12)); // NOI18N

        comboBoxLanguage.setFont(new java.awt.Font("Serif", 0, 12)); // NOI18N

        textFieldResourcePath.setFont(new java.awt.Font("Serif", 0, 12)); // NOI18N
        textFieldResourcePath.setText(configuration.getResourcesPath());

        buttonResourcePathFind.setFont(new java.awt.Font("Serif", 0, 12)); // NOI18N
        buttonResourcePathFind.setText("...");
        buttonResourcePathFind.setToolTipText("Escolher pasta...");
        buttonResourcePathFind.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                buttonResourcePathFindActionPerformed(evt);
            }
        });

        sliderGeneralVolume.setFont(new java.awt.Font("Serif", 0, 12)); // NOI18N
        sliderGeneralVolume.setValue((int)configuration.getGeneralVolume());
        sliderGeneralVolume.addChangeListener(new javax.swing.event.ChangeListener() {
            public void stateChanged(javax.swing.event.ChangeEvent evt) {
                sliderGeneralVolumeStateChanged(evt);
            }
        });

        sliderMusicVolume.setFont(new java.awt.Font("Serif", 0, 12)); // NOI18N
        sliderMusicVolume.setValue((int)configuration.getMusicVolume());
        sliderMusicVolume.addChangeListener(new javax.swing.event.ChangeListener() {
            public void stateChanged(javax.swing.event.ChangeEvent evt) {
                sliderMusicVolumeStateChanged(evt);
            }
        });

        sliderEffectVolume.setFont(new java.awt.Font("Serif", 0, 12)); // NOI18N
        sliderEffectVolume.setValue((int)configuration.getEffectVolume());
        sliderEffectVolume.addChangeListener(new javax.swing.event.ChangeListener() {
            public void stateChanged(javax.swing.event.ChangeEvent evt) {
                sliderEffectVolumeStateChanged(evt);
            }
        });

        sliderAudioChannels.setFont(new java.awt.Font("Serif", 0, 12)); // NOI18N
        sliderAudioChannels.setMaximum(32);
        sliderAudioChannels.setMinimum(2);
        sliderAudioChannels.setValue((int)configuration.getChannels());
        sliderAudioChannels.addChangeListener(new javax.swing.event.ChangeListener() {
            public void stateChanged(javax.swing.event.ChangeEvent evt) {
                sliderAudioChannelsStateChanged(evt);
            }
        });

        labelGeneralVolumeAmount.setFont(new java.awt.Font("Serif", 0, 12)); // NOI18N
        labelGeneralVolumeAmount.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        labelGeneralVolumeAmount.setText(String.valueOf((int)configuration.getGeneralVolume()));

        labelMusicVolumeAmount.setFont(new java.awt.Font("Serif", 0, 12)); // NOI18N
        labelMusicVolumeAmount.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        labelMusicVolumeAmount.setText(String.valueOf((int)configuration.getMusicVolume()));

        labelEffectVolumeAmount.setFont(new java.awt.Font("Serif", 0, 12)); // NOI18N
        labelEffectVolumeAmount.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        labelEffectVolumeAmount.setText(String.valueOf((int)configuration.getEffectVolume()));

        labelAudioChannelsAmount.setFont(new java.awt.Font("Serif", 0, 12)); // NOI18N
        labelAudioChannelsAmount.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        labelAudioChannelsAmount.setText(String.valueOf((int)configuration.getChannels()));

        textFieldHost.setFont(new java.awt.Font("Serif", 0, 12)); // NOI18N
        textFieldHost.setText(configuration.getHost());

        textFieldPort.setFont(new java.awt.Font("Serif", 0, 12)); // NOI18N
        textFieldPort.setText(String.valueOf(configuration.getPort()));

        sliderMaxConnections.setFont(new java.awt.Font("Serif", 0, 12)); // NOI18N
        sliderMaxConnections.setMaximum(5000);
        sliderMaxConnections.setMinimum(1);
        sliderMaxConnections.setValue((int)configuration.getMaxConnections());
        sliderMaxConnections.addChangeListener(new javax.swing.event.ChangeListener() {
            public void stateChanged(javax.swing.event.ChangeEvent evt) {
                sliderMaxConnectionsStateChanged(evt);
            }
        });

        labelMaxConnecitonsAmount.setFont(new java.awt.Font("Serif", 0, 12)); // NOI18N
        labelMaxConnecitonsAmount.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        labelMaxConnecitonsAmount.setText(String.valueOf(configuration.getMaxConnections()));

        buttonSave.setText("Salvar");
        buttonSave.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                buttonSaveActionPerformed(evt);
            }
        });

        buttonCancel.setText("Cancelar");
        buttonCancel.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                buttonCancelActionPerformed(evt);
            }
        });

        labelFullScreen.setFont(new java.awt.Font("Serif", 0, 12)); // NOI18N
        labelFullScreen.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        labelFullScreen.setText("Tela Cheia:");

        checkBoxFullScreen.setFont(new java.awt.Font("Serif", 0, 12)); // NOI18N
        checkBoxFullScreen.setSelected(configuration.isFullScreen());
        checkBoxFullScreen.setText("Ativar Tela Cheia");

        checkBoxSound.setFont(new java.awt.Font("Serif", 0, 12)); // NOI18N
        checkBoxSound.setSelected(configuration.isSound());
        checkBoxSound.setText("Ativar Som");

        labelAntialising.setFont(new java.awt.Font("Serif", 0, 12)); // NOI18N
        labelAntialising.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        labelAntialising.setText("Antialising:");

        labelTextAntialising.setFont(new java.awt.Font("Serif", 0, 12)); // NOI18N
        labelTextAntialising.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        labelTextAntialising.setText("Antialising para o texto:");

        antialisingButtonGroup.add(radioButtonAntialingOn);
        radioButtonAntialingOn.setSelected(configuration.isAntialising());
        radioButtonAntialingOn.setText("Sim");

        antialisingButtonGroup.add(radioButtonAntialingOff);
        radioButtonAntialingOff.setSelected(!configuration.isAntialising());
        radioButtonAntialingOff.setText("Não");

        textAntialisingButtonGroup.add(radioButtonTextAntialisingOn);
        radioButtonTextAntialisingOn.setSelected(configuration.isTextAntialising());
        radioButtonTextAntialisingOn.setText("Sim");

        textAntialisingButtonGroup.add(radioButtonTextAntialisingOff);
        radioButtonTextAntialisingOff.setSelected(!configuration.isTextAntialising());
        radioButtonTextAntialisingOff.setText("Não");

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(labelConfigTitle, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(separator1)
                    .addComponent(labelVideoTitle, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(labelResolution, javax.swing.GroupLayout.PREFERRED_SIZE, 160, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(comboBoxResolution, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(labelRender, javax.swing.GroupLayout.DEFAULT_SIZE, 160, Short.MAX_VALUE)
                            .addComponent(labelFullScreen, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(labelAntialising, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(labelTextAntialising, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(checkBoxFullScreen, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(comboBoxRender, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addGroup(layout.createSequentialGroup()
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(radioButtonAntialingOn)
                                    .addComponent(radioButtonTextAntialisingOn))
                                .addGap(27, 27, 27)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(radioButtonTextAntialisingOff)
                                    .addComponent(radioButtonAntialingOff))
                                .addGap(0, 0, Short.MAX_VALUE))))
                    .addComponent(separator2)
                    .addComponent(labelGeneralTitle, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(labelLanguage, javax.swing.GroupLayout.PREFERRED_SIZE, 160, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(comboBoxLanguage, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(labelResourcesPath, javax.swing.GroupLayout.PREFERRED_SIZE, 160, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(textFieldResourcePath)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(buttonResourcePathFind, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(1, 1, 1))
                    .addComponent(jSeparator1)
                    .addComponent(separator3)
                    .addComponent(labelSoundTitle, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(separator4)
                    .addComponent(labelNetworkTitle, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(labelHost, javax.swing.GroupLayout.PREFERRED_SIZE, 160, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(textFieldHost))
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(labelPort, javax.swing.GroupLayout.PREFERRED_SIZE, 160, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(textFieldPort))
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(labelGeneralVolume, javax.swing.GroupLayout.PREFERRED_SIZE, 160, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(sliderGeneralVolume, javax.swing.GroupLayout.PREFERRED_SIZE, 355, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(labelGeneralVolumeAmount, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(labelMusicVolume, javax.swing.GroupLayout.PREFERRED_SIZE, 160, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(sliderMusicVolume, javax.swing.GroupLayout.PREFERRED_SIZE, 355, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(labelMusicVolumeAmount, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(labelEffectVolume, javax.swing.GroupLayout.PREFERRED_SIZE, 160, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(sliderEffectVolume, javax.swing.GroupLayout.PREFERRED_SIZE, 355, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(labelEffectVolumeAmount, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(labelSoundChannels, javax.swing.GroupLayout.PREFERRED_SIZE, 160, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(sliderAudioChannels, javax.swing.GroupLayout.PREFERRED_SIZE, 355, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(labelAudioChannelsAmount, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGap(1, 1, 1))
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(labelSoundEnable, javax.swing.GroupLayout.PREFERRED_SIZE, 160, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(18, 18, 18)
                                .addComponent(checkBoxSound)
                                .addGap(0, 0, Short.MAX_VALUE))
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(labelMaxConenctions, javax.swing.GroupLayout.PREFERRED_SIZE, 160, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(sliderMaxConnections, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(labelMaxConnecitonsAmount, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGap(2, 2, 2))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                        .addGap(0, 0, Short.MAX_VALUE)
                        .addComponent(buttonCancel, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(buttonSave, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(labelConfigTitle, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(separator1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(labelVideoTitle)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(labelResolution, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(comboBoxResolution, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(labelRender, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(comboBoxRender, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(labelFullScreen, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(checkBoxFullScreen))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(labelAntialising, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(radioButtonAntialingOn)
                    .addComponent(radioButtonAntialingOff))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(labelTextAntialising, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(radioButtonTextAntialisingOn)
                    .addComponent(radioButtonTextAntialisingOff))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(separator2, javax.swing.GroupLayout.PREFERRED_SIZE, 4, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(labelGeneralTitle)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(labelLanguage, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(comboBoxLanguage, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(labelResourcesPath, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(textFieldResourcePath, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(buttonResourcePathFind, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(separator3, javax.swing.GroupLayout.PREFERRED_SIZE, 4, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(labelSoundTitle)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(labelSoundEnable, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(checkBoxSound))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(labelGeneralVolume, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(sliderGeneralVolume, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(labelGeneralVolumeAmount, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(labelMusicVolume, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(sliderMusicVolume, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(labelMusicVolumeAmount, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(labelEffectVolume, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(sliderEffectVolume, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(labelEffectVolumeAmount, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(labelSoundChannels, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(sliderAudioChannels, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(separator4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(labelNetworkTitle)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(labelHost, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(textFieldHost, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(labelPort, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(textFieldPort, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addComponent(labelAudioChannelsAmount, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                        .addComponent(labelMaxConenctions, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(sliderMaxConnections, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(labelMaxConnecitonsAmount, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(buttonSave, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(buttonCancel, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void buttonCancelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonCancelActionPerformed
        // TODO add your handling code here:
        configuration = ConfigurationManager.getInstace().loadConfiguration();
        this.dispose();
        synchronized(this) {
            this.notify();
        }
    }//GEN-LAST:event_buttonCancelActionPerformed

    private void buttonSaveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonSaveActionPerformed
        // Video
        Logger.logMessage("Saving configurations...");
        Logger.logMessage("Old configuration = "+configuration);
        Object resolution = comboBoxResolution.getSelectedItem();
        if( resolution instanceof String ) {
            try {
                Logger.logMessage("Casting CUSTOM RESOLUTION of String to FlexDisplayMode...");
                String customResolution = (String)resolution;
                Logger.logMessage("Custom resolution = "+customResolution);
                String data1[] = customResolution.split("x");
                String data2[] = data1[2].split(" ");
                FlexDisplayMode mode = new FlexDisplayMode(
                        Integer.valueOf(data1[0].trim()),
                        Integer.valueOf(data1[1].trim()),
                        Integer.valueOf(data2[0].trim()),
                        Integer.valueOf(data2[1].replace("Hz", "").replace("hz", "").trim()));
                Logger.logMessage("FlexDisplayMode = "+mode);
                configuration.setResolution(mode);
            } catch(Exception e) {
                Logger.logError(getClass().getSimpleName()+" - Não foi possivel utilizar a resolução personalizada!");
                JOptionPane.showMessageDialog(this, 
                        "Não foi possivel utilizar a resolução personalizada!", 
                        "Configuração - ERROR", JOptionPane.ERROR_MESSAGE);
                return;
            }
        } else if( resolution instanceof FlexDisplayMode ) {
            configuration.setResolution((FlexDisplayMode)resolution);
        }
        configuration.setRenderer((RendererType)comboBoxRender.getSelectedItem());
        configuration.setFullScreen( checkBoxFullScreen.isSelected() );
        configuration.setAntialising( radioButtonAntialingOn.isSelected() );
        configuration.setTextAntialising( radioButtonTextAntialisingOn.isSelected() );
        // Gerais
        configuration.setLanguage( ((Language)comboBoxLanguage.getSelectedItem()).getName() );
        configuration.setResourcesPath(textFieldResourcePath.getText());
        // Audio
        configuration.setSound( checkBoxSound.isSelected() );
        configuration.setGeneralVolume( sliderGeneralVolume.getValue() );
        configuration.setMusicVolume( sliderMusicVolume.getValue() );
        configuration.setEffectVolume( sliderEffectVolume.getValue() );
        configuration.setChannels( sliderAudioChannels.getValue() );
        // Rede
        configuration.setHost( textFieldHost.getText() );
        try {
            configuration.setPort( Integer.valueOf(textFieldPort.getText()) );
        } catch(Exception e) {
            configuration.setPort( FlexEngineServer.DEFAULT_PORT );
        }
        configuration.setMaxConnections( sliderMaxConnections.getValue() );
        Logger.logMessage("New configuration = "+configuration);
        ConfigurationManager.getInstace().setDefaultConfiguration(configuration);
        ConfigurationManager.getInstace().saveConfiguration();
        Logger.logMessage("Configuration saved!");
        this.dispose();
        synchronized(this) {
            this.notify();
        }
    }//GEN-LAST:event_buttonSaveActionPerformed

    private void buttonResourcePathFindActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonResourcePathFindActionPerformed
        // TODO add your handling code here:
        JFileChooser fileChooser = new JFileChooser("./");
        fileChooser.setDialogTitle("Selecione uma pasta...");
        fileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
        int value = fileChooser.showDialog(this, "Selecionar");
        if( value==JFileChooser.APPROVE_OPTION ) {
            try {
                File directory = fileChooser.getSelectedFile();
                textFieldResourcePath.setText(directory.getCanonicalPath()+"/");
            } catch (Exception ex) {
            }
        }
    }//GEN-LAST:event_buttonResourcePathFindActionPerformed

    private void sliderGeneralVolumeStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_sliderGeneralVolumeStateChanged
        // TODO add your handling code here:
        labelGeneralVolumeAmount.setText(sliderGeneralVolume.getValue()+"");
    }//GEN-LAST:event_sliderGeneralVolumeStateChanged

    private void sliderMusicVolumeStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_sliderMusicVolumeStateChanged
        // TODO add your handling code here:
        labelMusicVolumeAmount.setText(sliderMusicVolume.getValue()+"");
    }//GEN-LAST:event_sliderMusicVolumeStateChanged

    private void sliderEffectVolumeStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_sliderEffectVolumeStateChanged
        // TODO add your handling code here:
        labelEffectVolumeAmount.setText(sliderEffectVolume.getValue()+"");
    }//GEN-LAST:event_sliderEffectVolumeStateChanged

    private void sliderAudioChannelsStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_sliderAudioChannelsStateChanged
        // TODO add your handling code here:
        labelAudioChannelsAmount.setText(sliderAudioChannels.getValue()+"");
    }//GEN-LAST:event_sliderAudioChannelsStateChanged

    private void sliderMaxConnectionsStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_sliderMaxConnectionsStateChanged
        // TODO add your handling code here:
        labelMaxConnecitonsAmount.setText(sliderMaxConnections.getValue()+"");
    }//GEN-LAST:event_sliderMaxConnectionsStateChanged

    @Override
    public void setVisible(boolean b) {
        super.setVisible(b);
        synchronized(this) {
            try {
                this.wait();
            } catch (InterruptedException ex) {
                Logger.logError(getClass()+" - setVisible(): "+ex);
            }
        }
    }

    private static ConfigurationWindow instance;
    public static ConfigurationWindow getInstance() {
        if( instance == null ) {
            instance = new ConfigurationWindow();
        }
        return instance;
    }
    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        ConfigurationWindow.getInstance().setVisible(true);
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.ButtonGroup antialisingButtonGroup;
    private javax.swing.JButton buttonCancel;
    private javax.swing.JButton buttonResourcePathFind;
    private javax.swing.JButton buttonSave;
    private javax.swing.JCheckBox checkBoxFullScreen;
    private javax.swing.JCheckBox checkBoxSound;
    private javax.swing.JComboBox comboBoxLanguage;
    private javax.swing.JComboBox comboBoxRender;
    private javax.swing.JComboBox comboBoxResolution;
    private javax.swing.JSeparator jSeparator1;
    private javax.swing.JLabel labelAntialising;
    private javax.swing.JLabel labelAudioChannelsAmount;
    private javax.swing.JLabel labelConfigTitle;
    private javax.swing.JLabel labelEffectVolume;
    private javax.swing.JLabel labelEffectVolumeAmount;
    private javax.swing.JLabel labelFullScreen;
    private javax.swing.JLabel labelGeneralTitle;
    private javax.swing.JLabel labelGeneralVolume;
    private javax.swing.JLabel labelGeneralVolumeAmount;
    private javax.swing.JLabel labelHost;
    private javax.swing.JLabel labelLanguage;
    private javax.swing.JLabel labelMaxConenctions;
    private javax.swing.JLabel labelMaxConnecitonsAmount;
    private javax.swing.JLabel labelMusicVolume;
    private javax.swing.JLabel labelMusicVolumeAmount;
    private javax.swing.JLabel labelNetworkTitle;
    private javax.swing.JLabel labelPort;
    private javax.swing.JLabel labelRender;
    private javax.swing.JLabel labelResolution;
    private javax.swing.JLabel labelResourcesPath;
    private javax.swing.JLabel labelSoundChannels;
    private javax.swing.JLabel labelSoundEnable;
    private javax.swing.JLabel labelSoundTitle;
    private javax.swing.JLabel labelTextAntialising;
    private javax.swing.JLabel labelVideoTitle;
    private javax.swing.JRadioButton radioButtonAntialingOff;
    private javax.swing.JRadioButton radioButtonAntialingOn;
    private javax.swing.JRadioButton radioButtonTextAntialisingOff;
    private javax.swing.JRadioButton radioButtonTextAntialisingOn;
    private javax.swing.JSeparator separator1;
    private javax.swing.JSeparator separator2;
    private javax.swing.JSeparator separator3;
    private javax.swing.JSeparator separator4;
    private javax.swing.JSlider sliderAudioChannels;
    private javax.swing.JSlider sliderEffectVolume;
    private javax.swing.JSlider sliderGeneralVolume;
    private javax.swing.JSlider sliderMaxConnections;
    private javax.swing.JSlider sliderMusicVolume;
    private javax.swing.ButtonGroup textAntialisingButtonGroup;
    private javax.swing.JTextField textFieldHost;
    private javax.swing.JTextField textFieldPort;
    private javax.swing.JTextField textFieldResourcePath;
    // End of variables declaration//GEN-END:variables
}
